package com.study.kotlin

fun main() {
//    println("hello~")
//    var sum = sum(1, 2)
//    println("sum = ${sum}")
    vars(1,2,3,4,5)  // 输出12345
}

fun sum(a: Int, b: Int): Int {   // Int 参数，返回值 Int
    val c = 1
    return a + b +c
}

fun sum1(a: Int, b: Int) = a + b

fun vars(vararg v:Int){
    for(vt in v){
        print(vt)
    }
}